package com.hsbc.dev.teamo4.sms.common.utils.data;

import org.apache.commons.lang3.StringUtils;

/**
 * @author:Kevin
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.common.utils.data
 * @Description:
 * @Date date: 2018/7/28
 */
public class LevelUtil {
    public final static String SEPARATOR=".";
    public final static String ROOT="0";

    /**
     * calculateLevel
     * @param parentLevel
     * @param order
     * @return ： level
     */
    public static String calculateLevel(String parentLevel,int order){
        if (StringUtils.isBlank(parentLevel)) {
            return ROOT;
        }else {
            return StringUtils.join(parentLevel,SEPARATOR,order);
        }
    }

}
